package org.apogee.mil.client.services.admin;

import java.util.ArrayList;
import java.util.List;

import org.apogee.mil.shared.Question;

import com.extjs.gxt.ui.client.data.BaseModel;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface AdminServiceAsync {

	public void initialize(AsyncCallback<Boolean> callback);
	
	public void close(AsyncCallback<Boolean> callback);
	
	public void addUser(int userid, String username, String passwd, String firstName, String lastName, int accessLevel, String enabled, AsyncCallback<Boolean> callback);
	
	public void updateUsers(ArrayList<BaseModel> changes, AsyncCallback<Boolean> callback);

	public void getAvailableTests(AsyncCallback<ArrayList<BaseModel>> callback);
	
	public void getUsers(int accessLevel, AsyncCallback<ArrayList<BaseModel>> callback);
	
	public void getQuestions(String test, int numQuestions, int volume, int reviewType, AsyncCallback<List<Question>> callback);
	
	public void updateQuestion(String test, Question question, AsyncCallback<Boolean> callback);
	
	public void getAccessLevels(AsyncCallback<ArrayList<BaseModel>> callback);
	
	public void getGroups(AsyncCallback<ArrayList<BaseModel>> callback);
	
	public void updateGroups(ArrayList<BaseModel> changed, AsyncCallback<Boolean> callback);
	
	public void getTestsFromGroup(String groupId, AsyncCallback<ArrayList<BaseModel>> callback);
	
	public void getUsersFromGroup(String groupId, AsyncCallback<ArrayList<BaseModel>> callback);
	
	public void updateGroupings(String groupId, ArrayList<BaseModel> changes, AsyncCallback<Boolean> callback);
	
	public void createTest(String testName, AsyncCallback<Boolean> callback);
	
	public void getTrainers(AsyncCallback<ArrayList<BaseModel>> callback);
		
	public void updateTrainer(int trainerId, ArrayList<BaseModel> changes, AsyncCallback<Boolean> callback);
	
	public void getAllUsers(AsyncCallback<ArrayList<BaseModel>> users);
}
